package test;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import pojo.SongListRequest;
import service.SongListService;

/**
 * @Description: 用于测试歌单业务层方法
 */
@Slf4j
@SpringBootTest
public class TestSongListService {

    @Autowired
    private SongListService songListService;

    @Test
    public void testSongList(){
        log.info("测试获取全部歌曲列表：{}", songListService.songList(""));
        log.info("测试获取华语歌曲列表：{}", songListService.songList("华语"));
    }

    @Test
    public void testUpdateSongList(){
        SongListRequest updateSongListRequest = new SongListRequest();
        updateSongListRequest.setId(88);
        updateSongListRequest.setTitle("我爱听的");
        updateSongListRequest.setIntroduction("包含所有已经听过且比较喜欢的歌曲");
        updateSongListRequest.setIntroduction("华语");
        log.info("测试编辑歌单：{}", songListService.updateSongListMsg(updateSongListRequest));
    }
}